<?php

 /**
* 
*/
class DashboardController extends Controller

{
	public $layout='//layouts/templete';
	
	public function actionIndex()
	{
		
		$tipo=Yii::app()->user->getState('id_tipo');
		$id_usuario=Yii::app()->user->getState('id_usuario');
		if($tipo==='ADMIN' && $id_usuario>0)
			$this->render('index');
		else
			$this->redirect(array('site/index'));
	}
	public function actionLogout()
	{
		Yii::app()->user->logout();
		$this->redirect(array('site/index'));
	}
	



}
?>